import App from './App.vue'
import router from './router'
import store from './store'
import Vue from 'vue'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
//引入wangEditor
// import wangEditor from "wangeditor/src/wangEditor"
import wangEditor from  "wangeditor"
import axios from "axios";
//导入qs框架
import qs from 'qs';
//导入baseUrl  @代表src路径
import BaseUrl from "@/http/baseUrl";

Vue.use(ElementUI)
Vue.config.productionTip = false
//给Vue添加一个全局属性, 之后可以通过this.$wangEditor访问到此属性
Vue.prototype.wangEditor=wangEditor
Vue.prototype.axios=axios
Vue.prototype.qs=qs
Vue.prototype.BASE_URL = BaseUrl;


new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')


//重写方法解决报错问题
const  myReplace=router.replace;
router.replace=function replace(location){
  return myReplace.call(this,location).catch(err=>err);
}

const  myPush=router.push;
router.push=function push(location){
  return myPush.call(this,location).catch(err=>err);
}